package LeetcodeTest_forty_six;
//771. 宝石与石头
public class numJewelsInStones
{
    public static void main(String[] args)
    {
        String str1="aA";
        String str2="AddfAacs";
        System.out.println(solution.numJewelsInStones(str1,str2));
    }
}
class solution
{
    public static int numJewelsInStones(String jewels, String stones)
    {
        int count=0;
        for(int i=0;i<jewels.length();i++)
        {
            for(int j=0;j<stones.length();j++)
            {
                if(jewels.charAt(i)==stones.charAt(j))
                {
                    count++;
                }
            }
        }
        return count;
    }
}